import {createRouter, createWebHistory} from "vue-router";

export default createRouter({
    // 路由模式配置
    history: createWebHistory(),
    // 管理路由
    routes: [
        {
            path: '/home',
            component: () => import('@/pages/home/index.vue'),
        },
        {
            path: '/login',
            component: () => import('@/pages/login/index.vue'),
        },
        {
            path: '/content',
            component: () => import('@/pages/content/index.vue'),
        },
        {
            path: '/',
            redirect: '/login',
        }
    ],
    // 滚动条行为
    scrollBehavior(){
        return {
            left: 0,
            top: 0
        }
    }
})
